import axiosIns from '@/utils/request';
const proxyStr = '/proxy_yhgl';

export const fetchUser = {
  token: ({ loginName, loginPwd }) => {
    return axiosIns.post(`${proxyStr}/yhgl/login/token`, { loginName, loginPwd });
  },
  login: () => {
    return axiosIns.post(`${proxyStr}/yhgl/login/doLogin`);
  },
  logout: () => {
    return axiosIns.get(`${proxyStr}/yhgl/login/loginOut`);
  },
  userList: ({ organCode }) => {
    return axiosIns.post(`${proxyStr}/yhgl/user/queryUserList`, { organCode });
  },
  organTreeList: () => {
    return axiosIns.post(`${proxyStr}/yhgl/organ/queryOrganTreeList`);
  }
}